﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Automobile.service.DAL;
using Automobile.service.Model;

namespace Automobile.service.BLL
{
    public class ShipmentsBLL
    {
        ShipmentsDAL dal = new ShipmentsDAL();
        /// <summary>
        /// 根据规格查询商品
        /// </summary>
        /// <param name="Product_Modelspe"></param>
        /// <returns></returns>
        public List<Product> SearchProductByModelspe(string Product_Modelspe)
        {
            return dal.SearchProductByModelspe(Product_Modelspe);
        }
        /// <summary>
        /// 仓库下拉框
        /// </summary>
        /// <returns></returns>
        public List<WareHose> GetWareHoseList()
        {
            return dal.GetWareHoseList();
        }
        /// <summary>
        /// 经办人下拉框
        /// </summary>
        /// <returns></returns>
        public List<Employee> GetEmployeeList()
        {
            return dal.GetEmployeeList();
        }
        /// <summary>
        /// 会员下拉框
        /// </summary>
        /// <returns></returns>
        public List<MemberCard> GetMemberCard()
        {
            return dal.GetMemberCard();
        }
        /// <summary>
        /// 添加采购入库单信息
        /// </summary>
        /// <param name="P"></param>
        /// <param name="xml"></param>
        /// <returns></returns>
        public int ShipMentsAddDo(Shipments s, string xml)
        {
            return dal.ShipMentsAddDo(s, xml);
        }
        /// <summary>
        /// 主表显示
        /// </summary>
        /// <returns></returns>
        public List<Shipments> ShowShipments()
        {
            return dal.ShowShipments();
        }
        /// <summary>
        /// 根据id获取订单的主表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public List<Shipments> ShowShipmentsByid(int id)
        {

            return dal.ShowShipmentsByid(id);
        }
        /// <summary>
        /// 根据id获取订单的子表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public List<ShipmentMate> ShowShipmentsMateByid(int id)
        {
            return dal.ShowShipmentsMateByid(id);
        }
        /// <summary>
        /// 审核付款
        /// </summary>
        /// <param name="Shipments_Id"></param>
        /// <returns></returns>
        public int ShipmentPay(int Shipments_Id)
        {
            return dal.ShipmentPay(Shipments_Id);
        }
        public int count()
        {
            return dal.count() ;

        }
    }
}
